/**
 * Created by Administrator on 2015/12/29.
 */
angular.module('login.service',[])
  .service('loginService',['appItfAopService',function(appItfAopService){

    var loginData={"staffId":"","password":"","randomNum":"","chkrempwd":"no"};

    var params={
      "os":"android",
      "version":"",
      "filepath":""
      //"_GRANT_TICKET":"111111",
      //"_LOGIN_PARAM":"9E1D89F43B558A7DDDB7FDD172A0FD97A861F7C5DB1928656BA890B73D9719C7801AF37FE80E4FE4959E7F402C8DE36C625C0564D2F242A460769D41F846AB0EBC342ADAFE22E210CEB5F6D854756FD7ECA5FFEDB999C2455325F1D2DD45FD56AF6A58575DCCD3F519869061E4DF1233ADCC3180C3D75CD1A6FA02E9E4C268B51D34BB61CC2D3EEDF8B9790918F8853942C0D318DA918765873A964F1B0D2941AFA7C0894F5F3E57D6CB787B7A9889AF35B1A43A7B1A8C566BD9D7F29866147856EE724C9B1C59FA854FC8B73647F19866FA64E6D92810DA6310917FC45CBFA57DF33F632994EB3D6BD9D7F2986614788906578D8B6FA516BE35AC35BD2AE304A46E61CB8337B5B4288A136DF071F6CFF289496331E3B5D03CD1E7F8B05D667638CB3FB5AADABBBE7962E6DF1A9A60D5A4920249C24AC6F2CC94C6B06555B45C26307FC0BD438D52B5BAE5CD57E70F2DDED914939BB04A6D7C1A3F73A92FFD9AD16A294BC8C26EDC87FA1B29A3D46E42177F17EF522FEB46B79EF3AF635F62EEAB859D3621ED9C07C7279F905AEDA1A849C44CFB5EE17AD17051E056CCF81236F60D578765D35FFC0A5AE0B14E6DD87BB4B3A25C0B9B733D905ACFDBD7F750B9A5B3F6228F1EEEFEEAC94EFA0F9DF1D0F5967E5238A1F954C90261B4287D4B09DD4D8A1A46BFE81D",
      //"sysCode":"CBS", //系统编码 CBS 、BSS 、ESS ，必填
      //"psptType": "1", // 证件类型，必选
      //"brandCode":"4G00",  // 产品品牌，必选
      //"productTypeCode" : "4G000001", // 产品类型编码，必选
      //"psptId":"370402198707172514",  // 证件号码，必选
      //"netTypeCode": "50", // 产品网别，必选
      //"productId": "99999823", // 产品编码，必选
    };


    var resp={};

    return {

      getLoginData:function(){
        return loginData;
      },
      setLoginData:function(staffId,password){
        loginData.staffId=staffId;
        loginData.password=password;
      },


      getParams:function()
      {
        return params;
      },
      getResp:function()
      {
        return resp;
      },
      doLogin:function(param){
        return appItfAopService.do_Login_req(param);
        //return appItfService.do_validCust_req(params);
      },
      doGenerateSmsVerifyCode:function()
      {
        return appItfAopService.do_generateSmsVerifyCode_req(loginData);
      },
      doGerifySmsVerifyCode:function()
      {
        return appItfAopService.do_verifySmsVerifyCode_req(loginData);
      },
      /**
       * 检查版本更新
       * @returns {*}
       */
      doQueryLatestVersion:function()
      {
        return appItfAopService.do_queryLatestVersion_req(params);
      }

    };
  }]);
